import {
	request,
} from '@/api/request';
const apiList = [{
		// /api/goods/getType
		name: 'index',
		url: '/api/index/index',
		method:'GET'
	},
	{
		// /api/sale/saleindex
		name: 'saleindex',
		url: '/api/sale/saleindex',
		method:'GET',
		showlod:true
	}
	
]


module.exports = apiList.reduce((mode, params) => {
	mode[params.name] = (data, token) => request({
		url: params.url,
		method: params.method || 'POST',
		data,
		token,
		showlod:params.showlod
	})
	return mode
}, {})